import request from '@/utils/request'

// 查询专家团队列表
export function getTeamList(query) {
  return request({
    url: '/expert/team/list',
    method: 'get',
    params: query
  })
}

// 新增专家团队
export function addTeam(data) {
  return request({
    url: '/expert/team/add',
    method: 'post',
    data
  })
}

// 编辑专家团队
export function editTeam(data) {
  return request({
    url: '/expert/team/update',
    method: 'post',
    data
  })
}

// 专家团队详情
export function getTeamDetail(id) {
  return request({
    url: `/expert/team/detail?teamId=${id}`,
    method: 'get'
  })
}

// 专家团队以及用户列表
export function teamRoleList(query) {
  return request({
    url: '/expert/team/role/list',
    method: 'get',
    params: query
  })
}

// 团队-新增专家成员
export function teamAddBatch(data) {
  return request({
    url: '/expert/team/member/addbatch',
    method: 'post',
    data
  })
}

// 团队-批量移除专家成员
export function teamRemovebatch(data) {
  return request({
    url: '/expert/team/member/remove',
    method: 'post',
    data
  })
}

// 团队-设置负责人
export function teamSetLeader(data) {
  return request({
    url: '/expert/team/member/leader/set',
    method: 'post',
    data
  })
}
